home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / EGAVGA.SWG / 0053_Detect Presents of VGA.pas < prev    next >
Pascal/Delphi Source File  |  1993-07-16  |  1KB  |  36 lines

  1. ===========================================================================
  2.  BBS: Canada Remote Systems
  3. Date: 06-30-93 (16:12)             Number: 28771
  4. From: SEAN PALMER                  Refer#: NONE
  5.   To: JOHN DAILEY                   Recvd: NO
  6. Subj: VGA INFO                       Conf: (1221) F-PASCAL
  7. ---------------------------------------------------------------------------
  8. JD>I'm looking for a quick-and-dirty way of checking to see if
  9. JD>a user has VGA capability in text mode.  ie. 50 line mode.
  10. JD> Any help is appreciated.
  11.  
  12. function vgaPresent:boolean;assembler;asm
  13.  mov ah,$F; int $10; mov oldMode,al;  {save old Gr mode}
  14.  mov ax,$1A00; int $10;    {check for VGA/MCGA}
  15.  cmp al,$1A; jne @ERR;     {no VGA Bios}
  16.  cmp bl,7; jb @ERR;        {is VGA or better?}
  17.  cmp bl,$FF; jnz @OK;
  18. @ERR: xor al,al; jmp @EXIT;
  19. @OK: mov al,1;
  20. @EXIT:
  21.  end;
  22.  
  23. otherwise you can check the BIOS save data area for number of rows on
  24. screen... the EGA and VGA keep this updated, older adapters don't (they
  25. set it to 0)
  26.  
  27. you can just leave the screen in the mode it was in already this way.
  28.  
  29. var
  30.  lastRow:byte absolute $40:$84;    {newer bios only:rows on screen-1}
  31.  
  32.  * OLX 2.2 * Programming is like sex:  one mistake and you support it
  33.  
  34. --- Maximus 2.01wb
  35.  * Origin: >>> Sun Mountain BBS <<< (303)-665-6922 (1:104/123)
  36.